package com.yangquan.dao;

import com.yangquan.bean.Employee;
import com.yangquan.bean.EmployeeExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;

public interface EmployeeMapper {
    long countByExample(EmployeeExample example);
    //删除
    int deleteByExample(EmployeeExample example);

    int deleteByPrimaryKey(Integer empId);
    //增加
    int insert(Employee record);

    int insertSelective(Employee record);
    //只是查询出员工信息
    List<Employee> selectByExample(EmployeeExample example);
    // 通过员工的主键查询信息
    Employee selectByPrimaryKey(Integer empId);

    //select  在查询员工的时候也查询出对应的部门信息 
    List<Employee> selectByExamplehWithDept(EmployeeExample example);
    //通过主键查询员工和部门
    Employee selectByPrimaryKeyWithDept(Integer empId);
    
    //更新 spingmvc 
    int updateByExampleSelective(@Param("record") Employee record, @Param("example") EmployeeExample example);

    int updateByExample(@Param("record") Employee record, @Param("example") EmployeeExample example);

    int updateByPrimaryKeySelective(Employee record);

    int updateByPrimaryKey(Employee record);
}